package com.pri.chat.adapter;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.pri.chat.R;
import com.pri.chat.view.ImageViewPlus;

import java.util.List;

/**
 * 描述：添加类的描述
 *
 * @author wx5e48d604c2885118
 * @time 2020/4/9
 */
public class OtherInfoImgAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public OtherInfoImgAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        Glide.with(mContext).load(item)
                .transform(new CenterCrop(), new RoundedCorners(20))
                .into((ImageViewPlus)helper.getView(R.id.iv_dt_img));
    }
}
